/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.model.core;

/**
 * <p>Content image - that is some content resource that is actually an image of
 * supported type.</p>
 * <p>
 * Content image may be inserted to content of HTML-type fields while editing it
 * in edit mode. Also content image may be assigned to menu item.
 * </p>
 * <p><a href="ContentImage.java.html"><i>View Source</i></a>
 * </p>
 * <p/>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.15 $ $Date: 2006/08/03 10:07:34 $
 * @see ContentResource
 * @struts.form include-all="false" extends="ContentResourceForm"
 * @hibernate.joined-subclass table="`al_core_image`" lazy="false"
 * @hibernate.joined-subclass-key column="`resource_id`"
 */
public class ContentImage extends ContentResource {

	//~ Instance variables

    /**
     * Width of the image
     */
	protected Integer width;
    /**
     * Height of the image 
     */
	protected Integer height;

	//~ Methods

	/**
     * Returns width of this image
     *
	 * @return width of image
	 * @hibernate.property
	 * @hibernate.column name="`width`" not-null="true" unique="false"
     * @struts.form-field
     * @struts.validator type="required,integer"
	 */
	public Integer getWidth() {
		return width;
	}

    /**
     * Sets width of this image
     *
     * @param width the width of the image
     */
	public void setWidth(Integer width) {
		this.width = width;
	}

	/**
     * Returns height of this image
     *
	 * @return height of image
	 * @hibernate.property
	 * @hibernate.column name="`height`" not-null="true" unique="false"
     * @struts.form-field
     * @struts.validator type="required,integer"
	 */
	public Integer getHeight() {
		return height;
	}

    /**
     * Sets height of the image
     *
     * @param height the height of the image
     */
	public void setHeight(Integer height) {
		this.height = height;
	}

}
